﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAL
{
    /// <summary>
    /// 图书管理数据访问类
    /// </summary>
    public class BookDAL
    {
        SqlCommand cmd;//定义Command对象
        public BookDAL()
        {
            cmd = new SqlCommand();//实例化Command对象
            cmd.CommandType = CommandType.StoredProcedure;//定义Command对象实现使用存储过程
        }
        /// <summary>
        /// 获取书籍列表
        /// </summary>
        /// <returns>ds</returns>
        public DataSet GetBookList()
        {
            cmd.CommandText = "GetBookList";
            DataSet ds = SQLHelper.GetDataSet(cmd);
            return ds;
        }
    }
}
